1. Technical Field
The present invention relates generally to an improved data processing system and in particular to a method and apparatus for displaying pixels in a data processing system. Still more particularly, the present invention provides a method and apparatus for updating a window identification buffer used to display pixels in a data processing system dynamically based on the requirements of an application environment.
2. Description of Related Art
Computer graphics concerns the synthesis or display of real or imaginary objects from computer-based models. In computer graphics systems, images are displayed on a display device to a user in two dimensional and three dimensional forms. These images are displayed using pixels. A pixel is short for a picture element. One spot in a rectilinear grid of thousands of such spots that are individually “painted” to form an image produced on the screen by a computer or on paper by a printer. A pixel is the smallest element that display or print hardware and software can manipulate in creating letters, numbers, or graphics. These pixels and information relating to these pixels are stored in a buffer. The information describing a pixel is identified using a window ID (WID). A WID is used as an index into a window attribute table (WAT). The WAT contains information describing how a pixel will be displayed on the screen. For example, a WAT identifies depth, color map, buffer, and gamma for a pixel.
Typically, the WID is drawn into a separate buffer, which is used to describe how the pixels in the frame buffer or buffers will be displayed. Some graphic systems, such as, for example, UNIX servers, use overlays to enhance the performance of three dimensional applications, which need to have data overlaid on top of a three dimensional application. These type of servers typically require a separate WID buffer for the color planes and overlays to allow for a unique pixel interpretation for each layer. That is, separate WID buffers are used so that for any given pixel location, e.g., x=10, y=10, the pixel in the overlay can have a different pixel interpretation, e.g., different color map, depth, etc., from the one in the color planes.
An example of such an overlay is shown in FIG. 1. In this example, map 100 may be displayed using pixels located in two frame buffers and a single WID buffer. Map 100 includes a set of pixels in a color frame buffer that represent states in map 100. For example, shape 102 is that of the State of Texas. The pixels for shape 102 are located in a color frame buffer, while the text “Texas” 104 is located in a overlay frame buffer. In this example, “Texas” 104 is located in a region 106 in the overlay frame buffer, while shape 102 is located in a region 108 in the color frame buffer.
In FIG. 2A, an example of data in a portion of a WID color buffer is illustrated. FIG. 2B is an example of data in a portion of a WID overlay buffer. In these two examples, each of the numbers illustrates a WID which is used as an index into a WAT to identify information used to display a pixel associated with the WID. In FIG. 2B a zero is used to indicate that the overlay is disabled.
FIG. 3 illustrates resulting WIDs that would be used to display pixels displayed on a screen. Each of the WIDs identifies what pixels and from what buffer the pixels will be retrieved for display.
Typically, an eight bit split WID may he identified in hardware in which three bits are used to identify the WID for the overlay buffer and in which five bits are used to identify the WID for the color buffer. For example, the first three bits are used as an index into an overlay WAT while the lower five bits are used as an index into a color WAT. With three bits, eight WID entries may be identified or assigned to a pixel using the WID overlay buffer. Thirty-two different WID entries may be assigned to pixels using the WID color buffer. In this manner, a WID for a color buffer may be painted without overwriting the WIDs for the overlay buffer.
Alternatively, some hardware makes use of an eight bit split WID in which four bits are used to identify the WID for the color buffer and the other four bits are used to identify the WID for the overlay buffer. As a result, such a configuration provides sixteen WIDs for both the overlay and color planes.
Thus, in known systems, either an eight bit split WID with five bits used to identify a WID for the color buffer and three bits used to identify the WID for the overlay buffer or an eight bit split WID with four bits being used to identify each of the WID for the color buffer and the overlay buffer are provided in a graphics adapter. These configurations are fixed and not changeable.
As applications become more graphically sophisticated, these two static approaches to providing WID planes are fast becoming too limiting. This is especially true for today's dynamic graphics environment where the number of WIDs required for each layer, i.e. color and overlay, can vary greatly over time. Thus, there is a need for an improved apparatus and method for providing dynamically adjustable WID splits to accommodate the dynamic graphics environments of today's computer applications.